home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 16
/
CU Amiga Magazine's Super CD-ROM 16 (1997-10-16)(EMAP Images)(GB)[!][issue 1997-11].iso
/
CUCD
/
Online
/
HBBS
/
TODO.TXT
< prev
next >
Wrap
Text File
|
1997-09-03
|
29KB
|
868 lines
ToDo
====
Doors to create
---------------
New User announcer
Nuker/Faker/Mover
Online DiZ editor
Multinode chat door
Dupe Checker
CREDSLEFT <CONF>
Enforcer hits sometimes caused by the following doors:
======================================================
Extract_diz
Other Enforcer Hits
===================
If a door timeout has occurred everytime another door is started an enforcer hit is generated.
Misc
====
the following doors must cope with the NOUSER paramater for OFFLINE file checking
AddDIZToList --> Done!
LHAHistory --> Done!
Update_DIZ --> It's extract_diz!
MoveFile --> Done!
AddTime --> Done!
AddCreds --> Done!
Ask_Conf Door Not Written Yet
ConFirm_UL --> Done!
Check_Corrupt Door Not Written Yet
New_DIZ --> It's ModifyDIZ!
Modify_DIZ --> Done!
Extract_DIZ --> Done!
display a percentage read of the text file in the file listers.
!! change userdata so that uploaded/download bytes are float variables instead of
!! ulong's
when list of tagged files is reloaded the filesizes must be brought up to date
time awarding is not working correctly. 583 mins added for a 700k file.. erm...
have some variables in N_ND-> that doors can set before they call a DisplayScreen
@^DATA1@ .. @^DATA4@ are replaced with the data.. that would be very usefull
for custom door screens!
add GL_CountDown flag to DOOR_GetLine()
make the AskULFiles door display a list of the users files in the
current conference's partupload directory that need completing.
fix "please insert volume xxx" when tagging file in the cd-rom conf if
no cd-rom is in the drive (assign not valid)
update LHAHistory for .lzx/.lzh files too.
make it so that if a file called "SentBy.TXT" is uploaded when doing
an upload the users SentBy is set to the first xx printable chars in
the file. Then modify the SentBy door to tell the user this...!
keyboard shortcuts for ALL options/windows etc. on node and control
add option to override inactivity disconnects for local logins
document "G N" at prompt (logs out without checking for tagged files)
fix doortimeout crashes!
explain use of snoopdos to find problems
implement setting a door's task priority via the door config files..
e.g.
in HBBS:Commands/System enable stuff like XPR_Pri_1=2
Creat InactivityTimeout door to be called when a timeout has occured!
Create new frontend door that lets the user enter a username and password
without disturbing the on-screen ansi..
Fix Memory Leaks.
--> CodeWatcher HBBS:Control reports a long list of unfreed memory!!!!
(although it only totals up to about 2k..)
the shell door removes ='s from command lines
Q doesn't quit the zippy search whenit gets to the end of a filelist
XPR
===
make it refresh when you un-zoom the window!
Node
====
disable gadgets on node control window if UseDevice is FALSE
Comment
=======
if the sysop's handle is not valid it should cancel, and not ask for another handle!
CheckUser
=========
make checkuser check for time left! and log user off if no time left!
At the moment a user logs in and gets to the command prompt then the
Command prompt logs the user off
checktags
=========
list tagged files in a table: conf, size, filename
addcreds
========
add an autoawardmessage_x option todisplay a message if an auto award match was found!
(e.g. the user uploads an LSD release to an LSD bbs then display message "LSD Release Uploaded!")
LogOff
======
when checking for tagged files, have an option to never be asked this again.
maybe, you've got these files tagged, sure ya wanna leave [Y]es,[N]o,Ne[V]er...
if user selects never then we need to tell them how to turn the option back on again
Node_serial
===========
make hangup work for initiated calls...
--> this should be OK now, still need to test though.
Docs
====
Express that BBSGlobal->TotalUsers CANNOT be used to find the amount
of users in the userdata file (as deleted users can be overwritten)
User should not compact the userdata file when the bbs is running!
User is reminded to remove hbbs:system/data/users/<userdir> when removing a user..
express that Logoff.Global script will always be executed, even if a logoff.<node> script
exists as well.
cmdprompt
=========
add "Sorry you've run out of time" to BBSStrings.CFG
MailOptimize
============
create a program to check the MailStats.CFG files in each mail directory and get
it to update the FirstMessage (and LastMessage ?) items so that mail scanning
is quicker (i.e. so hbbs doesn't have to attempt to open the files
Message_0.CFG -> Message_<actual first msg>.CFG)
also have this program remove the expired messages..
not forgetting to make it run once a day. At every logoff would be a bad idea
as it may take a while! :-)
this program would also have to update all users UnreadList.CFG in
HBBS:Mail/Users/<id> as it could contain references to deleted mail messages
(note, possible way: make a list of all deleted messages in a list and check each
user against this list..)
AccountEdit
===========
check that user is not on-line already when in non SYSOPONLY mode (i.e. editing from
another node while the user is online is not allowed, to do this I need to send a
message to the node that the user is on to get it to halt while the pother use edits
the account, the data then needs to be copied to the user on-line data on the other
node.
Make it display *'s next to account settings that are incorrect (e.g.
invalid access level, no conf access settings file specified etc..)
make it so that you cannot edit your own account when you are online (it'll go wrong
at the moment) or better still, make it so that you can :-)
account presets (use the AccountEdit door to load/save/define them)
ReadMail
========
message reading (screen displaying), remove Continue [y/n] from screen..
allow option for sysop to read other users private mailboxes...
when scanning for mail to read, display the ctrl+c message but remove it when
scan is complete.
If no mail is found when scanning then tell the user so.
need option to read individual public mail messages.
e.g. "R P 2"
perhaps swap the [N]ext/[P]rev round when reading a list of mail messages that
starts from the newest message.
HBBSCommon
==========
add a routine to copy a list and it's contents
record all calls to DoErrorMessage...
--> with a LogError()
finish HBBS_LoadUser()
fix HBBS_ValidUserHandle() ref: TotalUsers
take the \r or \n from errstr in HBBS_LogError() (put there by asctime() ?)
FileLister
==========
add option to lister(s) (FR, N) showing the last x files uploaded (e.g. FR L 20 to show
the last 20 files uploaded in the current conf)
MailWrite
=========
filenote() the mail message .txt's!
backup mail messages (when written) to an archive, name of msg would be
<Type>-<Conf>-<FromID>-<ToID/NAME>
so, when you write a mail it'll just add the file to an .LHA archive thus giving
you a space saving way of backing up your message base..
notes: make the mail_write/mail_reply call a door with the names of the
filenames they create after each message has been saved to disk.
allow the username Sysop, and replace it with BBSGlobal->SysopAccount
if only one paramater and the parameter is more than 1 char then it must be some
user handles, therefore default to conference mail and send the mail
e.g. E fred,barney
HBBSNode
========
add a GL_#? flag that tells the system to print out the contents of a string
every x microseconds while it is waiting for input. This is a wicked idea.
Using this you can have cool ansi animations going on while you're waiting
at a prompt for example...
implement: GL_ANSIANIM
in N_ND create a pointer to a list which contains strings and call it
node: struct List *N_ND->AnsiAnimList;
this pointer must point to a valid list or be set to NULL and doors
must check it before they use it (well, the DOOR_GetLine() must...)
Shell
=====
fix lockup bug and make cooler
(what lockup bug ?)
-> I've been using the shell lots recently and it's not gone wrong once.
fix cd'ing into files !?! :-)
if the user types in one parameter, then check to see if it's a filename
if it is check to see if it's a directory. if it is then CD into it.
Download
========
still needs a sysop download
Node_Misc.c
===========
fix problem (not bug) with @^@ codes and special formatting.. I'm using sprintf()
to do the formatting at the moment, so you just use std 'C' % formatting options
like %-15s (-> @^-15s^ComputerType@ in a screen ), but if the item you are printing
is more that than the amount of chars you specify it will not chop the rest off...
the downside to this is that if you designs screens (like raider has done for me)
they kind of mess up when you use long strings etc...
--> nope, just use something like... @^-15.15s^ComputerType@ and it's fine
Add Ctrl-C checking to DisplayScreen() and DisplaySpecialScreen()
DisplayScreen() needs more N_ND->OnlineStatus checking after pause prompts
--> almost done, needs fixing for await door special case
Other Stuff
===========
create an Error Watcher program, which sets up a port called "HBBS_Error_X" (where x is
a number, so you can have more than one port..), then change hbbs_LogError()
so it checks for those ports and sends them the details of the error in a message.
Then a sysop can have a window pop up on his screen with the error... (great for
finding problems with a setup..) you could also have a program like SendOLM in
HBBS:Utils that checks to see if a co-sysop or sysop is on-line and sends them the message
too! Cool...
Frontend
========
call a door called 2NDPASSWORD just after the users password has been entered correctly
and before anything else happens. Door_Continue and Door_Return need to be checked/set
option to display screen instead of messages (i.e. user presses return at login prompt)
make it check to see if the user is logged onto another node, if they are, deny access
move some strings from N_ND->NodeSettings to the appropriate door's config file
(e.g. usernameprompt should really be in FrontEnd.CFG...)
Fix bug with OLM's and FrontEnd (when you're typing in a node password)
Implement Calls Allowed checking
Time Checking (as in, can the user login at this time)
Structures.h
============
Implement Extra#? settings that are defined in structures.h
Control
=======
Needs to report on Conflist/Conferences - ConfList/ConfLocation amount mismatch
Add option to Enable/Disable BBSGlobal->LogConfig from GUI.
AddCreds
========
check that AddCreds door can accept a conference number as a parameter to allow
for easy implementation of conference accounting..
CheckFiles is OK for this.
but we need a global method of checking credits allowed that accepts a conference as well
or there's no point giving addcreds a conf number.
--> TagFile now calls the "OKToTag" system door
TagFile
=======
make the TagFile door call a door called "OKToTag" with the conference num and filename as
parameters (for easy implementation of conference accounting and file restriction doors)
(like passworded files..)
--> it now calls OKtoTAG with the following params <filename> <fullname> <size> <conf>
Add File Password support (i.e. change tag door so search for a config file
that has a list of filenames, and passwords. (maybe a confnum too, depends wether you'll ever
have files of the same name in a difference conference..)
Hmm, example config file (HBBS:Doors/System/TagFile/PasswordedFiles.CFG)
Name_1=HydraBBSA13.LHA
Type_1=CONF ; could be CONF, or SYSTEM (i.e. filename can be full path if using SYSTEM)
Conf_1=5 ; HBBS Conf if CONF is used
Level_1=250 ; if you are below this access level you will be asked for the Password
Password_1=BETA ; where "BETA" is the actual password..
Name_2=HBBS:System/Data/User.Data
Type_2=SYSTEM
Level_2=255
Password=DataFile
oh, and we also need another config file with a list of files that cannot
be downloaded except by the sysop.. ie. HBBS:Doors/System/TagFile/RestrictedFiles.CFG
File_1=HBBS:System/Data/User.Data
File_2=HBBS:Doors/System/TagFile/TagFile
OKtoTAG
=======
system door called by TAG_FILE. should set doorreturn to NO if the file is NOT to be tagged.
the purpose of calling this door is for easy conference accounting implementation
NodeInput.C
===========
Fix ctrl-x/up/down with GL_NODISTURB (door writers should not use GL_HISTORY until
this is fixed if possible..)
have a cool DOOR_WriteTextSpecial() function that given the corrent "flags, timeouts
and string" will display text on the screen as if it was coming from a 300baud modem
as per the "wargames" film.
Add option to toggle BBSGlobal->LogConfig from a keypress (like shift+F8) etc..
AutoComment
===========
Write a GUI for AutoComment and finish it!
Node
====
remove the file NodeLocation/work/XPR_SkippedFiles.CFG when a user logs off.
in node_input.c/freedata() ?
Fix HBBS_OnlineTime(), it doesn't return correct value if user never logs on.
(i.e. timeout at frontend)
clear contents of hbbs:nodes/nodex/work
implement reserving node
--> done
make it so that the node watch windows can be opened on a different public screen
to that of the Control Program
add routine to show all availiable public screens and use instead of a string gadget
when selecting screen to appear on.
(unless reqtools has this option...)
network mail! yeah!
option for sysop to set N_ND->DoorLogOverride=TRUE (button on GUI)
option on CommandPrompt door to log all commands user types (like DoorLog in /X)
(DoorLog in HBBS is a bit different...)
startup log
when locally uploading, duplicate files are not checked for. This is maily due to the fact
that no door is called yet for local uploads.
spell checker on messages!
add a file_id.1 into files with a one-line description..
util to convert aminet cd dirs to hbbs filelistings..
and a 1 id to the filelist format same as F but with only a one-line description..
create docs with a list of /X config settings in and show the user
what the same things are in HBBS
change watch window font depending on conference..
you can currently write a USER mail to ALL !
have it so that you can enable different logs for different users. for instance,
say you have a user who's a bit dogdey you might want to enbale the doorlog for
him, but not for everyone else... Coooooooooooool!
doubleclicking on a user name in a listview window should bring up an
account editor with the users details in! :-)
make the G door accept NOPROMPT as an option.
create a ST door so that sysop's can flag files for other users..
--> you can do this anyway by editing the files in HBBS:System/Data/Taggedfiles/#?
add QUIET parameter to Tag_File
add a GL_KEEPPROMTIFBLANK which will return the prompt string (if specified) in
N_ND->CurrentLine if the user delete's the prompt string and leaves a blank line!
make node, settings, and configure windows pop to front if already open.
add an [U]pload to the editor program..!
also, in the editor, check to see if the login type is a local login, if so, ask the
sysop wether to use an actual GUI Text editor (like TTX) to edit the message...
set a button on the control to open up a node's "Settings" window!
change the door commands and how doors are run..
Ideas
call <Name>_Door_<n> <name>_Data_<n> so it avoid confusion
when using something like SCREEN or ECHO for a door type.
also you need to be able to specify the paramters that were typed at the bbs
prompt as options for doors, be you must also be able to add your own options
to them as well, example:
FR_Type_1=NORMAL
FR_Data_1=HBBS:Doors/User/FileReverse/FR.HBBS {nodenum} {bbsoptions} CONF
FRS_Type_1=NORMAL
FRS_Data_1=HBBS:Doors/User/FileReverse/FR.HBBS {nodenum} {bbsoptions} HOLD
where {nodenum} is replaced by the node number, {bbsoptions} are replaced by the
options that were typed at the bbs prompt.. so, if a user on node 3 types
FR N -2
the actual command executed would be
HBBS:Doors/User/FileReverse/FR.HBBS 3 N -2 CONF
much better than just appending the params to a program. also like this
you can place the parameters in any order you like.. thus being able to cope with
far more programs and it also makes the program more flexible. it also
reduces the amount of seperate doors you might need..
also I need a DOOR_Continue(TRUE/FALSE) and associated
N_ND->DoorContinue.
if a door sets door continue to false the next door will not be run
if the configuration for a door has more than one door associated
with the command.
e.g.
the download door a) calls the HBBS:Doors/<blah>/Download.HBBS, then
it would b) call the door HBBS:Doors/<blah>/QuickStats.HBBS.
obviosly, the download door might be cancelled before we actually
transfer some files, so it would set DoorContinue to FALSE then
the quickstats door would not be run..
change GetLine()
Ideas..
instead of going TRUE,TRUE,0,blahh.. use FLAGS
so we need these flags
EDIT // left/right cursor keys and backspace + delete
HISTORY // allow cursor up/down to gothrough the history
DISPLAY // display text on screen at all ?
LINEWRAP // if reached maxlen and last key pressed was a non space
// char then copy all data back to the previous space char
// to N_ND->CurrentLineWRAP and return IN_GOTLINE
NORETURN // does not print a "\r\n" when the user presses return
IMMEDIATE // returns when the user has typed in MaxLen chars
// don'tuse with linewrap :-)
// use immediate and noreturn for hoykey support. -> COOL
also we need to be able to prompt the user with a default string for an option.
timeout is in micros
An example prototype might be
GetLine(Flags,PasswordChar,MaxLen,TimeOut,PromptStr);
the above example takes less params then the current version *AND* offers more
scope
-------------
existence of tagged files must be verifyied when the saved tags are loaded in
again (when a user logs on, see node_input.c)
change str_CtrlScrnName from a set length variable to a string pointer, and allow
changing between a public screen name and "CtrlScrn", that way you can hbbs on a WB
screen.
Use this function more!!!
-> HBBS_LogError(BBSGlobal->ErrorLogFile,ERR_GENERAL,outstr,TYPE_WARNING);
add options for /X help for sysop's and users to help them change between systems
(i.e. when a sysop presses F10 wanting to log a user off tell him to press
SHIFT+F10 instead of just F10..etc... do the same sort of things for door commands..)
when a node starts it must check the playpen and work for file and move/delete them
accordingly. (check id of last user that called from log files..)
Add NamesNotAllowed files to Node_XX directories, don't make it a config file,
just have a list of names so it's easier to add/remove names rather than having to
change name_xx = name_xx when you remove a name from the middle of the list.
Add tones and tonnes of error messages that are logged in the logfile..
Add DOOR_HuntScreen() to door library to search for screens in the node
directory and then the screens directory, with option for adding a specified access
level. e.g. DOOR_HuntScreen("Files",20); where it would search for Files_20.TXT...
make HBBS_SaveUser() or whatever to search for users with a status of
user_overwritable
change ALL strncpy()'s to strNcpy()!!! IMPORTANT!! (strncpy() does not *always* null terminate strings..)
add option "SkipOK" to Device config so that if you have a weird modem you
can tell the bbs not to wait for the OK string after commands..
when control is opened on a 16 colour screen set the first 8 colours
to the standard ANSI colours and set the next 4 colours to the usual WB colours.
then set the dripens for drawing windows/gadgets etc to point to the usual colours
--> nearly done, sets palette and dri-pens, but just can't get the background
of the screen and windows to be anthing other then colour 0... Hrmmm..
get the Node program to run a door just after frontend called "Speed_XX.HBBS", where
xx is replaced by the baud rate of the caller..
add timeout on doors, best place would be where NODE looks at messages coming
from the door program, you could set a timer when the door has started (when you get
a doorstart IO message) and see if it times out, if it does then cancel running that
door. Also you'd have to reset the timer everytime the node received a message
from the door, BUT, file transfers will be sending all their data via messages
so you could only reset the timer on bog standard messages, perhaps set up a new
type of message for use only by transfer protocols that would be skipped...
have a button in the node's settings window to manually stop a door. This is cool
if a door has crashed and you want the system to continue.. also the timeout on the
door function would need to call the same cleanup function. was thinking of being
able to pass the a pointer to the door you want to cancel as a parameter, to
HBBS_CleanupDoor()
have option for sysop, so that they can choose to strip all ansi colour changes
from the watch window, thus speeding up the user's display. (this would also be better
if the sysop was using watch windows on a 2,4 or 8 colour screen.)
add time, bytes etc to the HBBS_ModifyString() function in HBBSNode.C.
--> done, still need to add bytes to ModifyString() tho.
--> need to write a door called "CREDSLEFT" which you pass a conference
number and it returns the amount of credits you have left in that
conference
add in developer docs and specify the point that you can't have config item options
as follows
Item_XX
Item_XX_Blah
as HBBS_RemoveCfgItem("Item_#?") would remove ALL the items above..
instead the door coder must use options like these:
Item_XX
Item_Blah_XX
oh, and don't use ?'s or #?'s in item names :-)
state importance of taking a copy of N_ND->CurrentLine before passing it to another
door as a parameter, in developer docs...
have userhandle, and status (u/l'd d/l'd pw failed, scanned, paged etc) all on the
window title of a watch screen or window..
--> handle, group and speed are displayed..
--> have a little window that appears on the watch screen (if open) or the
control screen that disaplsy stuff about the current user.
ToDone :-)
======
fix bug with a closed console screen sometimes crashing the system, to check do this:
load up node3, close the screen, load up term. use nullmodem.device, unit 7. and
try and log in. it crashed when you press return after typing in a correct handle..
--> done, it was Node_Console.c's SetWatchTitles() on a closed window...
add @^PAUSE_TIMEOUT^@ with options timeout length
--> done, it's @^TPAUSE^<seconds>@
make it so that if you pass 0 as a buffersize to HBBS_CopyFile() then it'll use
a default value. (sysop specifyable...!! cool idea!)
--> done, see BBSGlobal->CopyBufferSize
abort prompt when cancelling message
--> done
implement bbsglobal->CallsEver
--> done
fix who door, long names/handles cause it to fuck itself..
--> done
if settings window is open, bring it to front
--> done
write the following to the CallersLog file when a user logs off
uploads, downloads, ulbytes, dlbytes, nukes, pages, msgs read, msgs written
then it'll be dead easy to provide statistics for bulletins etc!
--> done
fix small bug in @^SYSDOOR@ANNOUNCE OFF@, the command the gets run has two spaces
between the node number and the OFF parameter instead of one.
e.g. 19-JUN-1996 18:56:16 Handle: hydra, Conf: Amiga Warez, Door: HBBS:Doors/System/Announce/Announce.HBBS 3 OFF
--> done
option to have a list of users that dooroverride is set to on for
(i.e. a list of suspect users that have been trying to play around with your bbs!)
-->done, created SetSuspect system door
option for getline, GL_NODISTURB. needs to make it so that if you specify a maxlen
then it means it musn't move things on the same line after the input position
(e.g. see why on the sent door)
need to be able to have "Enter Name: [ ]", at the moment the ] gets moved
--> done
RAW input for doors (i.e. show a text fiel and let users press keys to pause it etc..)
--> done, see DOOR_CheckRaw(Flags);
make node wait for SIGBREACK_CTRLC or sommat in the getline loop..
--> nope, use CheckRaw() for checking for Ctrl-C pressed
create caller logs (ie, when a user logs on and at what speed and all that shite..
--> done
create a history file for the wall with the users handle on it..
--> done
ban ;'s from user handles and names (and anything else that might go into a config
file :-)
--> see HBBS+_HandleNameOK()
when downloading, display what was selected (start, goodbye, abort...)
--> done
make the sentby used
--> done, see AddDIZToList
error checking on ConfAcs loading... (problems if file does not exist)
--> done, acount edit and checkuser have been updated
sentby ask door (see userdata structure)
--> done, see AskSentBy
sentby attach to uploads
--> Done, see AddDIZToList
implement LanguageName_XX and LanguageExtn_XX for screens...
--> done
implement ConfAcs files, add checkuser to get it to check for a users confacs file
beging present, if not write a msg to a log file
(refs: Access/Levels/Level_List, System/Data/ConfAcs/#?)
--> done
When displaying screens that use pause or call another door, if the user hangs
up or times out the routine does not exit. it continues displaying the screen
and running more doors etc.
--> fixed
fix enforcer hit when moving a failed upload in MoveFile door
--> fixed
document list of all required directories
--> done
fix enforcer hits when /'s are left off paths in "conflist"
--> maybe fixed.
empty file_id.diz in file makes it so that the file is not added to the list, but the user
still gets credits for the file. So fix!!
--> a user CANNOT enter a blank file_id.diz anymore..
Create log file for every call to HBBS_LoadConfig(), HBBS_GetSetting() and HBBS_SaveConfig()
this will help the sysop imensely!
--> done, see hbbs:bbsglobal/logconfig and configlogfile options
JoinConference
==============
changing to a conference tha a user can see but does not have access to results
in the error "Invalid Conference Number", it should be "Access Denied".
--> done
Also if you use start join conference with no params and use a conference number
that you can see but don't have access to, you don't get any message.
--> done
update join conference so that it takes not of the new N_ND->User.ConfAcs settings!
--> done
ReadMail
========
make R (mail) start from the LAST message instead of the first (for /x people...:-)
--> Done
AwaitConnect
============
F4 does not always work ?!?
--> fixed!
struct MyDataStructure
{
struct Node node;
char mystring[10];
}
struct Node
{
struct Node *ln_Prev;
struct Node *ln_Succ;
};
struct List
{
struct Node *lh_Head;
struct Node *lh_Tail;
};
void test( void )
{
struct List *mylist;
struct MyDataStructure *mydata;
struct Node *node;
if (mylist=(struct List*)malloc(sizeof(struct List))) // allocate the list
{
NewList(mylist); // initialise the list
if (mydata=(struct MyDataStructure *)malloc(sizeof(struct MyDataStructure))) // allocate some space for our data
{
strcpy(mydata->mystring,"test 1"); // make use of the data structure
AddTail(mylist,(struct Node*)MyDataStructure); // add the data structure to the list
}
if (mydata=(struct MyDataStructure *)malloc(sizeof(struct MyDataStructure)))
{
strcpy(mydata->mystring,"test 2");
AddTail(mylist,(struct Node*)MyDataStructure);
}
// point mynode to the first node in the list
// the ln_Succ has to be NON zero for the node to be valid, if it is zero then we've reached the end of the list
// point mynode to the next node (node->ln_Succ)
for (mynode=(struct MyDataStructure *)mylist->lh_Head; mynode->node.ln_Succ ;mynode=(struct MyDataStructure *)mynode.node->ln_Succ)
{
puts(mynode->mystring);
}
// now we have to free everything
while (mylist->lh_Head->ln_Succ) // does the list contain nodes ?
{
node=strlist->lh_Head; // point to the start of the list.
Remove(node); // remove the node from the list, this does't free any data, it just updates
// pointers in the nodes surrounding it so that they don't point to it anymore.
Free(node); // this free's the memory allocated to the node
}
Free(mylist); // free the list itself.
}
}